#ifndef WLTERM_SITE_H
#define WLTERM_SITE_H
#include <gtk/gtk.h>

#define SITE_NAME_LEN	30
#define	SITE_ADDRESS_LEN 40
#define ENCODING_LEN	20
#define ANTI_IDLE_STR_LEN	30
#define TERM_TYPE_LEN	10
#define ESC_STR_LEN		10
#define AUTOLOGIN_STR_LEN	20
#define USERNAME_LEN	30
#define PASSWORD_LEN	30


enum LoginType {
	TELNET,
	SSH
};

typedef struct _WltermSite {
	gchar name[SITE_NAME_LEN]; /* site name */
	gchar address[SITE_ADDRESS_LEN]; /* site address */
	gint8 anti_idle_time; /* in seconds */
	gchar anti_idle_str[ANTI_IDLE_STR_LEN]; /* send str to anti idle */
	gchar term_type[TERM_TYPE_LEN]; /* vt100 or other */
	gchar esc_str[ESC_STR_LEN]; /* convert esc to this str */
	enum LoginType login_type; /* 0: telnet 1:ssh */
	gint8 port; /* port */
	gint8 ssh_version; /* 1 or 2 */
	gboolean auto_login;
	gchar pre_login_cmd[AUTOLOGIN_STR_LEN];
	gchar post_login_cmd[AUTOLOGIN_STR_LEN];
	gchar username[USERNAME_LEN];
	gchar password[PASSWORD_LEN];
	gint8 rows;
	gint8 cols;
	gchar encoding[ENCODING_LEN]; /* most GBK or BIG5*/
} WltermSite;

WltermSite * wlterm_site_create();
void wlterm_site_destroy(WltermSite *thiz);

#endif /* WLTERM_SITE_H */
